<!DOCTYPE html> 
<html> 
<head> 
	<!--META-->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=0.75">

	<!--CSS-->
	<link rel="stylesheet" href="API/css/themes/default/jquery.mobile.min.css" />
	<link rel="stylesheet" href="API/css/themes/default/jquery.mobile.structure.min.css" />
	<link rel="stylesheet" href="API/css/themes/default/jquery.mobile.theme.min.css" />
	<link rel="stylesheet" href="API/css/mycss.css" />
	<link rel="stylesheet" href="css/mycss.css" />
	
	<!--JS-->
	<script type="text/javascript" src="API/js/jquery.min.js"></script>
	<script type="text/javascript" src="API/js/jquery.mobile.min.js"></script>
	<script type="text/javascript" src="API/js/fonctions.js"></script>
	<script type="text/javascript" src="js/fonctions.js"></script>
	
	<script language="javascript" type="text/javascript">
		///////////////////
		//BLOCK VARIABLE GLOBAL
		///////////////////
		var id_page = 2;
		
		///////////////////
		//BLOCK FONCTIONS EVENEMENTS
		///////////////////
		$(document).on('pageinit',function() {
		    try {
				// Init commmun
				init_commun();
			
				// Init page
				afficherExperiences();
				$( "#div_competences" ).trigger( "expand" );
            }
            catch (er) {
                log(0, "ERROR(init_home):" + er.message);
            }
        });

		$(document).on('pageshow',function() {
			try {
				show_commun();
			}
			catch (er) {
				log(0, "ERROR(show):" + er.message);
			}
		});
		
		///////////////////
		//BLOCK FONCTIONS METIER
		///////////////////
		function afficherExperiences() {
            try {
				$( "#div_competences" ).trigger( "collapse" );
				
				$("#div_resultat_recherche").remove();
				
				var strRecherche = $('#search-mini').textinput()[0].value;
                var result = new Array();
				result = getExperiences(strRecherche);
				
				var strHtml = "";
				strHtml = getExperiencesHTML(result);
				
				$("#div_recherche").append(strHtml).trigger('create');
            }
            catch (er) {
                log(0, "ERROR(afficherExperiences):" + er.message);
            }
        }
		
		///////////////////
		//BLOCK FONCTIONS PRESENTATION
		///////////////////
		function getExperiencesHTML(p_tab) {
            try {
				var strRetour = "";
				
				strRetour += "<div data-role=\"content\" data-theme=\"c\"/ id=\"div_resultat_recherche\">";
				
				for (var indice in p_tab) {
					strRetour += "<div data-role=\"collapsible\" data-theme=\"c\" data-content-theme=\"c\" data-collapsed=\"false\" data-mini=\"true\">";
					strRetour += "	<h3>"+p_tab[indice][1]+" ("+p_tab[indice][5]+") - "+p_tab[indice][3]+" &agrave; "+p_tab[indice][4]+"</h3>";
					if(p_tab[indice][2] != ""){
						strRetour += "	<h5>"+p_tab[indice][2]+"</h5>";
						strRetour += "	<hr>";
					}
					strRetour += "	<dl title=\""+p_tab[indice][1]+"\">";
					if(p_tab[indice][6] != ""){
						strRetour += "		<dt>Fonction</dt>";
						strRetour += "		<dd>"+p_tab[indice][6]+"</dd>";
					}
					if(p_tab[indice][7] != ""){
						strRetour += "		<dt>Secteur</dt>";
						strRetour += "		<dd>"+p_tab[indice][7]+"</dd>";
					}
					if(p_tab[indice][8] != ""){
						strRetour += "		<dt>Conception fonctionnelle</dt>";
						strRetour += "		<dd>"+p_tab[indice][8]+"</dd>";
					}
					if(p_tab[indice][9] != ""){
						strRetour += "		<dt>R&eacute;alisation</dt>";
						strRetour += "		<dd>"+p_tab[indice][9]+"</dd>";
					}
					if(p_tab[indice][10] != ""){
						strRetour += "		<dt>Language</dt>";
						strRetour += "		<dd>"+p_tab[indice][10]+"</dd>";
					}
					if(p_tab[indice][11] != ""){
						strRetour += "		<dt>Environnement applicatif</dt>";
						strRetour += "		<dd>"+p_tab[indice][11]+"</dd>";
					}
					if(p_tab[indice][12] != ""){
						strRetour += "		<dt>Environnement devellopement</dt>";
						strRetour += "		<dd>"+p_tab[indice][12]+"</dd>";
					}
					if(p_tab[indice][13] != ""){
						strRetour += "		<dt>Environnement base de donn&eacute;es</dt>";
						strRetour += "		<dd>"+p_tab[indice][13]+"</dd>";
					}
					strRetour += "	</dl>";
					strRetour += "</div>";
				}
				
				strRetour += "</div>";
				
				return strRetour;
            }
            catch (er) {
                log(0, "ERROR(getExperiencesHTML):" + er.message);
				return "";
            }
        }
		
		///////////////////
		//BLOCK FONCTIONS DB
		///////////////////
		function getExperiences(p_critere) {
		// [0][0] =  ordre
		// [0][1] =  titre_experience
		// [0][2] =  commentaire_titre
		// [0][3] =  debut
		// [0][4] =  fin
		// [0][5] =  employeur
		// [0][6] =  fonction
		// [0][7] =  secteur
		// [0][8] =  fonctionnel
		// [0][9] =  realisation
		// [0][10] = language
		// [0][11] = applicatif
		// [0][12] = develloppement
		// [0][13] = bdd
		
            try {
                var strResponse = "";
                var returns = new Array();
                var tempTab = new Array();
                var tempSubTab = new Array();

                xhr_object = new AJ();

                var url = "phpsql/mysql_getExperiences.php?milis="+getMilise()+"&critere=" + p_critere;

                xhr_object.open("GET", url, false);
                xhr_object.send(null);
                if (xhr_object.readyState == 4) {
                    strResponse = xhr_object.responseText;
                } else {
                    strResponse = "ERROR";
                }

                tempTab = strResponse.split("\n");

                for (var indice in tempTab) {
                    tempSubTab = tempTab[indice].split("&");
                    if (tempSubTab.length > 1) {
                        returns[returns.length] = tempSubTab.slice(0, tempSubTab.length - 1);
                    }
                }

                delete xhr_object;

                return returns;
            }
            catch (er) {
                log(0, "ERROR(getExperiences):" + er.message);
            }
		}
	</script>
</head> 

<body> 

	<!-- page -->
	<div data-role="page" data-title="Mon CV en ligne - Fabrice Rosito">
	
		<!-- /panel -->
		<div data-role="panel" id="mypanel" data-display="overlay" data-position="left">
		
		</div>
		<!-- /panel -->
	
		<!-- header -->
		<div data-role="header" data-theme="c" data-position="fixed">
			<a href="#mypanel" data-role="button" data-icon="home" data-iconpos="notext">home</a>
			<h1 id="id_titre">titre</h1>
			<a href="javascript:window.location = ('./page_contact.html?mili='+getMilise());" data-role="button" data-icon="info" data-iconpos="notext">Contact</a>
		</div>
		<!-- /header -->

		<!-- content -->
		<div data-role="content" data-theme="c" id="main_content">
			<div data-role="collapsible" data-theme="c" data-content-theme="c" data-collapsed="false" data-mini="true" id="div_competences">
				<h3>Mes comp&eacute;tences</h3>
				<label>* 1 = de base, 2 = familier, 3 = comp&eacute;tent, 4 = expert</label>
				<table data-role="table" id="movie-table" data-mode="reflow" class="ui-responsive table-stroke ui-table ui-table-reflow">
				  <thead>
					<tr>
					  <th data-priority="1">Savoir faire</th>
					  <th data-priority="2">Ann&eacute;es</th>
					  <th data-priority="1">Niveau*</th>
					</tr>
				  </thead>
				  <tbody>
					<tr>
					  <th colspan="3">Comp&eacute;tences techniques</th>
					</tr>
					<tr>
					  <td>Java (LOG4J, SPRING, JSP, Web Sphere, JUNIT, Ant, Maven, JQuery, JQueryMobile)</td>
					  <td>5</td>
					  <td>3</td>
					</tr>
					<tr>
					  <td>.NET : version 1.0,  2.0 et 3.5, VB.net, C#, ASP, ASP.net</td>
					  <td>2</td>
					  <td>2</td>
					</tr>
					<tr>
					  <td>SQL</td>
					  <td>10</td>
					  <td>2</td>
					</tr>
					<tr>
					  <td>XML, SHELL, AJAX, PLSQL, ASM, XLST, VB, VB script, JavaScript, C, C++, Hibernate, CSS, XHTML</td>
					  <td>8</td>
					  <td>3</td>
					</tr>
					<tr>
					  <th colspan="3">Connaissance des applications</th>
					</tr>
					<tr>
					  <td>BDD : Access, Oracle, MYSQL, SQL Serveur</td>
					  <td>10</td>
					  <td>3</td>
					</tr>
					<tr>
					  <td>IDE : Eclipse, NetBeans, Visual Studio, Jdeveloper</td>
					  <td>8</td>
					  <td>2</td>
					</tr>
					<tr>
					  <td>Gestion des sources : VSS, SVN</td>
					  <td>5</td>
					  <td>2</td>
					</tr>
					<tr>
					  <td>Serveur : WebSphere, Jonas, Tomcat, IIS, Apache</td>
					  <td>5</td>
					  <td>3</td>
					</tr>
					<tr>
					  <td>Outils : UML, Pl/sql Developer, Jbuilder, Toad, SoapUi, FTP, VNC, putty</td>
					  <td>8</td>
					  <td>3</td>
					</tr>
					<tr>
					  <th colspan="3">Disciplines en technologies de l'information (TI)</th>
					</tr>
					<tr>
					  <td>Disciplines en technologies de l'information (TI)</td>
					  <td>5</td>
					  <td>3</td>
					</tr>
					<tr>
					  <th colspan="3">Connaissance des secteurs</th>
					</tr>
					<tr>
					  <td>T&eacute;l&eacute;coms : Application de m&eacute;diation (Inventaire, provisionning xDSL), Inventaire Morning, CIT, Sonatel, Interco.</td>
					  <td>8</td>
					  <td>2</td>
					</tr>
					<tr>
					  <td>M&eacute;tallurgique : Laboratoire de recherche des productions.</td>
					  <td>3</td>
					  <td>2</td>
					</tr>
					<tr>
					  <td>Semi-conducteur : Gestion de la production.</td>
					  <td>2</td>
					  <td>2</td>
					</tr>
					<tr>
					  <td>Pharmaceutique : Gestion RH des chaines de production.</td>
					  <td>2</td>
					  <td>2</td>
					</tr>
					<tr>
					  <td>Cimenterie : Gestion d'activit&eacute; des usines.</td>
					  <td>2</td>
					  <td>2</td>
					</tr>
					<tr>
					  <th colspan="3">Autre comp&eacute;tence pertinente</th>
					</tr>
					<tr>
					  <td>Statisticien.</td>
					  <td>5</td>
					  <td>2</td>
					</tr>
				  </tbody>
				</table>
			</div>
			<div data-role="collapsible" data-theme="c" data-content-theme="c" data-collapsed="false" data-mini="true" id="div_recherche">
				<h3>Mon exp&eacute;rience</h3>
				<label for="search-mini">Texte de recherche :</label>	
				<input type="search" name="search-mini" id="search-mini" value="" data-mini="true" placeholder="Votre recherche ici (Vide pour tout ou ex : java, test, etc...) :" />		
				<a href="javascript:;"onClick="afficherExperiences();" data-role="button" data-inline="true" data-icon="arrow-r" data-mini="true">Soumettre</a>					
			</div>
		</div>
		<!-- /content -->
		
		<!-- footer -->
		<div data-role="footer" data-position="fixed" data-theme="c">
			<a data-role="button" data-icon="search" data-iconpos="notext" class="ui-btn-left" href="javascript:window.location = ('./page_faq.html?mili='+getMilise());">FAQ</a>
			<h1 id="id_affichageUser">User</h1>
			<a data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" data-theme="c" href="javascript:window.location = ('./page_sortie.html?mili='+getMilise());">Logout</a>
		</div>
		<!-- /footer -->
		
	</div>
	<!-- /page -->
	
</body>
</html>

